From: Jeroen van der Heijden Date: Fri, 29 Jun 2018 20:51:53 +0000 (+0200) Subject: Upd grammar, better help loading X-Git-Tag: archive/raspbian/2.0.44-1+rpi1~1^2~3^2~9^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=462a419a96193af20f39a0cb1bb260759f866769;p=siridb-server.git Upd grammar, better help loading --- diff --git a/grammar/gogrammar/grammar.go b/grammar/gogrammar/grammar.go index b61dd6fc..e737c79b 100644 --- a/grammar/gogrammar/grammar.go +++ b/grammar/gogrammar/grammar.go @@ -4,7 +4,7 @@ package grammar // should be used with the goleri module. // // Source class: SiriGrammar -// Created at: 2018-06-29 17:12:20 +// Created at: 2018-06-29 22:48:05 import ( "regexp" diff --git a/include/siri/grammar/grammar.h b/include/siri/grammar/grammar.h index 44568b64..1e51a7c6 100644 --- a/include/siri/grammar/grammar.h +++ b/include/siri/grammar/grammar.h @@ -5,7 +5,7 @@ * should be used with the libcleri module. * * Source class: SiriGrammar - * Created at: 2018-06-29 17:09:17 + * Created at: 2018-06-29 22:48:05 */ #ifndef CLERI_EXPORT_SIRI_GRAMMAR_GRAMMAR_H_ #define CLERI_EXPORT_SIRI_GRAMMAR_GRAMMAR_H_ diff --git a/src/siri/grammar/grammar.c b/src/siri/grammar/grammar.c index dad86d35..467913e0 100644 --- a/src/siri/grammar/grammar.c +++ b/src/siri/grammar/grammar.c @@ -5,7 +5,7 @@ * should be used with the libcleri module. * * Source class: SiriGrammar - * Created at: 2018-06-29 17:09:17 + * Created at: 2018-06-29 22:48:05 */ #include "siri/grammar/grammar.h" @@ -1653,7 +1653,7 @@ cleri_grammar_t * compile_grammar(void) cleri_t * help_timeit = cleri_keyword(CLERI_GID_HELP_TIMEIT, "timeit", CLERI_CASE_SENSITIVE); cleri_t * help_timezones = cleri_keyword(CLERI_GID_HELP_TIMEZONES, "timezones", CLERI_CASE_SENSITIVE); cleri_ref_set(help_stmt, cleri_sequence( - CLERI_NONE, + CLERI_GID_HELP_STMT, 2, k_help, cleri_optional(CLERI_NONE, cleri_choice( diff --git a/src/siri/parser/listener.c b/src/siri/parser/listener.c index bdce9539..f771f3f0 100644 --- a/src/siri/parser/listener.c +++ b/src/siri/parser/listener.c @@ -846,7 +846,6 @@ static void enter_group_match(uv_async_t * handle) static void enter_help(uv_async_t * handle) { - LOGC("Enter!!"); siridb_query_t * query = (siridb_query_t *) handle->data; cleri_node_t * node = query->nodes->node; @@ -2726,14 +2725,11 @@ static void exit_help_xxx(uv_async_t * handle) { siridb_query_t * query = (siridb_query_t *) handle->data; - LOGC("HERE...."); - if (query->data != NULL) { #if DEBUG assert (query->packer == NULL); #endif - LOGC("HERE1....%u", query->nodes->node->cl_obj->gid); const char * help = siri_help_get( query->nodes->node->cl_obj->gid, (const char *) query->data, @@ -2741,7 +2737,6 @@ static void exit_help_xxx(uv_async_t * handle) if (help == NULL) { - LOGC("HERE2...."); siridb_query_send_error(handle, CPROTO_ERR_QUERY); return; }